package com.lsa.iview.trees;

import static com.lsa.iview.trees.BinaryTreeUtils.*;

import java.io.File;
import java.io.IOException;

import com.lsa.helpers.IntegerComparator;

import junit.framework.TestCase;

public class SimpleTest extends TestCase {
	public void test() throws IOException {
		BinaryTree<Integer> t = createTree(IntegerComparator.instance(),20, 107, 33, 38, 48, 70,
				136, 112, 109, 130, 116, 245, 138, 228, 183, 201, 231, 233,
				265, 295);
		
		File path = writeAsTgfToFile(t, "data/gen/iview/trees/testSimple2.tgf");
		System.out.println(path.getAbsolutePath());
		
//		BinaryTreeUtils.mirror(t.getRoot());
//		writeTreeToFile(t, "data/gen/iview/trees/testSimple3.tgf");
		
		BinaryTreeUtils.doubleTree(t.getRoot());
		writeAsTgfToFile(t, "data/gen/iview/trees/testSimple3.tgf");
		
//		BinaryTree<Integer> t = createRandomIntTree(20, 1, 300);
//		File path = writeTreeToFile(t, "data/gen/iview/trees/testSimple1.tgf");
//		System.out.println(path.getAbsolutePath());
	}
}
